﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Color = Microsoft.Xna.Framework.Color;

namespace Tetris
{
    public class Score
    {
        private SpriteFont font;

        private int value;
        private int level;
        private int recordScore = 0;
        private string recordPlayer = "Player 1";

        public int Value
        {
            set { this.value = value; }
            get { return value; }
        }
        public int Level
        {
            set { level = value; }
            get { return level; }
        }
        public int RecordScore
        {
            set { recordScore = value; }
            get { return recordScore; }
        }
        public string RecordPlayer
        {
            set { recordPlayer = value; }
            get { return recordPlayer; }
        }

        public Score(SpriteFont font)
        {
            this.font = font;
            Initialize();
        }

        public void Initialize()
        {
            value = 0;
            level = 1;
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            //new Vector2(1.5f * 24, 3 * 24)
            //1.5f * 24, 13 * 24
            spriteBatch.DrawString(font, "Score:\n" + value + "\nLevel: " + level, new Vector2(30, 650), Color.Green);

            spriteBatch.DrawString(font, "Record:\n" + recordPlayer + "\n" + recordScore, new Vector2(300, 650), Color.Orange);
        }
    }
}
